#include "stdafx.h"
#include <iostream>

using namespace std;


void buble2( int a[], int size )
{



    int max;
    int temp = size - 1;
 
    for ( int i = 0; i < size; i++, temp-- )
    {
        max = 0;
 
        for ( int j = 0; j <= temp; j++ )
            if ( a[ j ] > a[ max ] )
                max = j;
 
        swap ( a[ max ], a[ temp ] );
    }


	
}